package com.ruoyi.workflow.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.workflow.domain.Role;
import com.ruoyi.workflow.mapper.RoleMapper;
import com.ruoyi.workflow.service.IRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 角色业务层
 */
@Service
public class RoleServiceImpl extends ServiceImpl<RoleMapper, Role> implements IRoleService {

    @Autowired
    private RoleMapper roleMapper;

    @Override
    public List<Role> selectByPage() {
        Page<Role> page = new Page<>(1, 5);
        roleMapper.selectByPage(page);
        List<Role> records = page.getRecords();
        return records;
    }
}
